package com.larsgard.gedviewer.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.larsgard.gedviewer.shared.ListUserTreesResult;

public class ListUserTreeResultEvent extends GwtEvent<ListUserTreeResultEvent.Handler> {

    public interface Handler extends EventHandler {
	public void onResultLoaded(ListUserTreesResult result);
    }

    public static final Type<Handler> TYPE = new Type<Handler>();

    private ListUserTreesResult result;

    public ListUserTreeResultEvent(ListUserTreesResult result) {
	this.result = result;
    }

    @Override
    protected void dispatch(Handler handler) {
	handler.onResultLoaded(result);
    }

    @Override
    public Type<Handler> getAssociatedType() {
	return TYPE;
    }
}
